Passed
Push — main ( b7799b...6c7a2f )
by Bjarn
03:09 queued 01:45
created

stopCommand.ts ➔ installCommand   A

Complexity

Conditions 1

Size

Total Lines 7
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 7
c 0
b 0
f 0
rs 10
cc 1
1
import commander from 'commander'
2
import ServiceController from '../controllers/serviceController'
3
4
export default function stopCommand(program: typeof commander) {
5
    return program
6
        .command('stop [service]')
7
        .description('Stop all or a specific service.')
8
        .action((service: string | undefined) => {
9
            (new ServiceController()).executeStop(service).catch(err => console.log(err.message))
10
        })
11
}